package com.lj.luoye.lotteryticket.dialog;

import android.content.Context;

/**
 */

public class MyDialogUtil {
    public static interface DialogBtnOnClick{
        void onBtn1Click();
        void onBtn2Click();
    }

    /**
     *
     * */
    public static void showLogoutDialog(Context mContext, String title, String message, CommonDialog.CommonDialogListener commonDialogListener){
        CommonDialog.Builder builder = new CommonDialog.Builder(mContext);
        final CommonDialog mDialog = builder.setTitle(title)
                .setMessage(message).setBtn1Text("取消").setBtn2Text("退出").setCommonDialogListener(commonDialogListener).create();
        mDialog.show();
    }

    /**
    *
    * */
    public static void showMessageDialog(Context mContext, String title, String message){
        CommonDialog.Builder builder = new CommonDialog.Builder(mContext);
        final CommonDialog mDialog = builder.setTitle(title)
                .setMessage(message).setBtn1Text("知道了").create();
        mDialog.show();
    }

    public static void showBuyConfirm(Context mContext, CommonDialog.CommonDialogListener commonDialogListener){
        CommonDialog.Builder builder = new CommonDialog.Builder(mContext);
        final CommonDialog mDialog = builder.setTitle("买定")
                .setMessage("买定后将不能更改，确定要买定吗？").setBtn1Text("取消").setBtn2Text("确定").setCommonDialogListener(commonDialogListener).create();
        mDialog.show();
    }

}
